package com.kehan.aidl_server.entity;


import android.os.Parcel;
import android.os.Parcelable;

public class SensorConfig implements Parcelable {

    private String mSensorName;

    private String mSensorCmd;

    public String getmSensorName() {
        return mSensorName;
    }

    public void setmSensorName(String mSensorName) {
        this.mSensorName = mSensorName;
    }

    public String getmSensorCmd() {
        return mSensorCmd;
    }

    public void setmSensorCmd(String mSensorCmd) {
        this.mSensorCmd = mSensorCmd;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.mSensorName);
        dest.writeString(this.mSensorCmd);
    }

    public void readFromParcel(Parcel source) {
        this.mSensorName = source.readString();
        this.mSensorCmd = source.readString();
    }

    public SensorConfig() {
    }

    protected SensorConfig(Parcel in) {
        this.mSensorName = in.readString();
        this.mSensorCmd = in.readString();
    }

    public static final Parcelable.Creator<SensorConfig> CREATOR = new Parcelable.Creator<SensorConfig>() {
        @Override
        public SensorConfig createFromParcel(Parcel source) {
            return new SensorConfig(source);
        }

        @Override
        public SensorConfig[] newArray(int size) {
            return new SensorConfig[size];
        }
    };


    @Override
    public String toString() {
        return "SensorConfig{" +
                "mSensorName='" + mSensorName + '\'' +
                ", mSensorCmd='" + mSensorCmd + '\'' +
                '}';
    }
}
